package com.eig.courseweb.controller;

import com.eig.common.vo.Result;
import com.eig.courseweb.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.annotation.Resource;

/**
 * @author ：StudentLsj（李世界）
 * @date ：Created in 2023/01/13 下午 05:18
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("core/order")
@Api(tags = "订单")
@EnableSwagger2
public class OrderController {

    @Resource
    private OrderService orderService;

    @PostMapping("/getOrderStatus/{id}/{HuiYuanId}")
    @ApiOperation(value = "根据课程id和会员id查询支付状态")
    public Result getOrderStatus(@PathVariable String id, @PathVariable String HuiYuanId) {
        return orderService.getOrderStatus(id,HuiYuanId);
    }
}
